<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<cpn></cpn>
			<cpn>
				<template slot-scope="slot">
					<!-- <span v-for="item in slot.data">{{item}}  -  </span> -->
					<span>{{slot.data.join(' - ')}}</span>
				</template>
			</cpn>
			<cpn>
				<template slot-scope="slot">
					<span v-for="item in slot.data">{{item}}  *  </span>
				</template>
			</cpn>
		</div>
		<template id="cpn">
			<div>
				<slot :data="pLanguages">
					<ul>
						<li v-for="item in pLanguages">{{item}}</li>
					</ul>
				</slot>
			</div>
		</template>
	</body>
	<script type="text/javascript">
		const app = new Vue({
			el:'#app',
			data:{
				message:'你好'
			},
			components: {
				cpn: {
					template: "#cpn",
					data() {
						return {
							pLanguages: ['javascript','c++','java','c#','go']
						}
					}
				}
			}
		})
	</script>
</html>
